//
//  BoolToOnlineStatusValueTransformer.m
//  EVE Mac Suite
//
//  Created by Vadim Lozko on 3/21/09.
//  Copyright 2009 __Vadim__CompanyName__. All rights reserved.
//

#import "BoolToOnlineStatusValueTransformer.h"


@implementation BoolToOnlineStatusValueTransformer

+ (Class)transformedValueClass
{
	return [NSString class];
}

+ (BOOL)allowsReverseTransformation
{
    return NO;
}

- (id)transformedValue:(id)value
{
	if(value == nil) return @"";
	BOOL boolValue = [(NSNumber*)value boolValue];
	if(boolValue == YES) return @"Online";
	if(boolValue == NO) return @"Offline";
	else return @"";
}

@end
